//
//  HTAdReducer.swift
//  MagaCore
//
//  Created by MrMessy on 2023/5/18.
//

import Foundation
import ReSwift

struct HTAdReducer {
  static var var_reducer: Reducer<HTAdState> {
    return { action, state in
      var state = state ?? HTAdState()
      guard let action = action as? HTEnumAdAction else {
        return state
      }
      switch action {
      case .htEnumAdConfig(var_adConfig: let var_adConfig):
        state.var_adConfig = var_adConfig
        return state
      case .htEnumSetShowPremiumGuideStatus(var_showPremiumGuideStatus: let var_showPremiumGuideStatus):
        state.var_showPremiumGuideStatus = var_showPremiumGuideStatus
        return state
      }
    }
  }
}
